package Morning;

import java.util.Iterator;
import java.util.TreeSet;

public class TreeSetGompareto {


    public static void main(String[] args) {

        TreeSet<Student> res = new TreeSet<>();


        res.add(new Student("张姗姗", 29, 80));
        res.add(new Student("李智", 29, 90));
        res.add(new Student("王福贵", 29, 89));
        res.add(new Student("欧阳追风", 30, 89));
        res.add(new Student("欧阳凤", 30, 89));


        Iterator<Student> iterator = res.iterator();
        while (iterator.hasNext()){

            System.out.println(iterator.next());
        }


    }
}
